﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;

namespace GameSchool.Models
{
	public class CommentRepository
	{
		CommentDbContextDataContext db = new CommentDbContextDataContext();
		public IEnumerable<Comment> Comments()
		{
			return db.Comments;
		}

		public void Save()
		{
			db.SubmitChanges();
		}

		public void Add(Comment newComment)
		{
			db.Comments.InsertOnSubmit(newComment);
		}
	}
}